package cn.schoolwow.quickdao.test.module.business.user.transaction.rollback.testcase;

import cn.schoolwow.quickdao.test.module.business.user.transaction.common.flow.InitialTransactionFlow;
import cn.schoolwow.quickdao.test.module.business.user.transaction.rollback.flow.CheckRollbackUserRoleTransactionResultFlow;
import cn.schoolwow.quickdao.test.module.business.user.transaction.rollback.flow.RollbackUserRoleTransactionFlow;
import cn.schoolwow.quickflow.domain.FlowContext;
import cn.schoolwow.quickflow.flow.BusinessFlow;

public class RollbackTransactionTestCaseFlow implements BusinessFlow {
    @Override
    public void executeBusinessFlow(FlowContext flowContext) throws Exception {
        flowContext.startFlow(new InitialTransactionFlow())
                .next(new RollbackUserRoleTransactionFlow())
                .next(new CheckRollbackUserRoleTransactionResultFlow())
                .execute();
    }

    @Override
    public String name() {
        return "回滚用户角色事务测试用例";
    }
}
